
/* Generated by Interface Builder */

#import "SignalMgr.h"

#import <objc/List.h>

#import <signal.h>
#import <libc.h>

static id		_SignalMgrObject = nil ;

void interruptHandler ( void )
{
	[ _SignalMgrObject interrupt ] ;
	return ;
}

struct sigvec	_SignalMgrVec = { interruptHandler, 0, SIGUSR1 } ;


@implementation SignalMgr

+ new
{
	if ( ! _SignalMgrObject )
	{
		_SignalMgrObject = [ [ super alloc ] init ] ;
		sigvec ( SIGUSR1, &_SignalMgrVec, 0 ) ;
	}
	return _SignalMgrObject ;
}


- alloc
{
	[ self error: "SignalMgr: ALLOC not allowed on single instance classes.\n" ] ;
	return nil ;
}


- init
{
	objectList = [ [ List alloc ] init ] ;
	return self ;
}


- addObject: anObject
{
	[ objectList addObject: anObject ] ;
	return self ;
}


- removeObject: anObject
{
	[ objectList removeObject: anObject ] ;
	return self ;
}


- interrupt
{
	[ objectList makeObjectsPerform: @selector ( interrupt ) ] ;
	return self ;
}


@end
